package com.cn.zsc.service;

import com.cn.zsc.db108.dao.Xa108Mapper;
import com.cn.zsc.db108.model.Xa108;
import com.cn.zsc.dblocal.dao.XaLocalMapper;
import com.cn.zsc.dblocal.model.XaLocal;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;

@Service
public class XaService {

    @Resource
    private Xa108Mapper xa108Mapper;

    @Resource
    private XaLocalMapper xaLocalMapper;

    @Transactional(transactionManager = "xaTransaction")
    public void testXA(){
        Xa108 xa108 = new Xa108();
        xa108.setId(1);
        xa108.setName("xa_108");
        xa108Mapper.insert(xa108);


        XaLocal xaLocal = new XaLocal();
        xaLocal.setId(1);
        xaLocal.setName("xa_local1111");
        xaLocalMapper.insert(xaLocal);

    }
}
